import { useState } from "react";

export default (props: any) => {

 

  const onSelection = (selectedKeys: any, selectedRows: any) => {

  };

  const rowSelection = {
    onChange: (selectedKeys, selectedRows) => {
      onSelection(selectedKeys, selectedRows);
    },
  };




  
  const columns = [
    {
      title: '功能模块',
      dataIndex: 'name',
      key: 'name',
      width: '20%',
    },
    {
      title: '操作权限',
      dataIndex: 'action',
      key: 'action',
      render: (value, { id, path }) => {
        return (
          <Checkbox.Group options={value} value={[]} onChange={(value) => onCheck(id, value, path)} />
        );
      },
    },
  ];
  return (
    <Table
      columns={columns}
      pagination={false}
      expandable={{ defaultExpandAllRows: true }}
      rowSelection={{ ...rowSelection, selectedRowKeys: Object.keys(selected), checkStrictly: true }}
      dataSource={dataSource}
    />
  );
};
